home *** CD-ROM | disk | FTP | other *** search
- /* $Header: C:/SRC/MOUSE/PVCS/M_HANDLE.C_V 1.3 12 Jun 1989 21:34:36 $
- Dwight N. Tovey (adapted from the July/August 1988 issue of TURBO TECHNIX.
-
- This file contains the mouse interrupt handler. On entry, the ax - dx
- registers are saved into temporary variables. A pointer to the Program
- Segment Prefix is established and the register values are stuffed into
- a structure there. (This area is defined in "GMOUSCUR.I")
-
- NOTE: Because of the inline assembly code, this module must be compiled
- with MS QuickC V2.0, or any other compiler that understands assembly.
-
- $Log: C:/SRC/MOUSE/PVCS/M_HANDLE.C_V $
- /*
- /* Rev 1.3 12 Jun 1989 21:34:36
- /* Changed handler definition to use the 'interrupt' attribute.
- /* Changed save area for regs to be a external global variable instead
- /* of trying to use the PSP.
- /* Removed all in-line assembly code.
- /* Removed handler_init function.
- /*
- /*
- /* Rev 1.2 31 May 1989 20:44:36
- /* Mouse interrupt handler routine.
- /*
- /*
- /* Rev 1.1 28 May 1989 6:27:52
- /* Corrected error of not pointing to PSP area before trying to stuff
- /* values into it.
- /*
- /*
- /* Rev 1.0 21 May 1989 6:59:30
- /* Initial revision.
- */
- #include <stdlib.h>
- #include <dos.h>
-
- #include "gmouscur.h"
-
- extern EVENTREC theEvents; /* Pointer to save area in diff segment. */
-
- static void interrupt cdecl far mouse(
- es, ds, di, si, bp, sp, bx, dx, cx, ax, ip, cs, flags )
- unsigned es, ds, di, si, bp, sp, bx, dx, cx, ax, ip, cs, flags;
- /* Event handler called by dummy handler function (below). */
- {
- theEvents.flag = ax; /* Save registers */
- theEvents.button = bx;
- theEvents.col = cx;
- theEvents.row = dx;
- }
-
-
- void far handler()
- {
- mouse();
- }
-